for i in range(1,10):
    # print(i)
    for j in range(1,i+1):
        # print(j)
        print('{}*{}={}\t'.format(j,i,i*j),end='')
    print()

for a in ['1','2','3']:
    for b in ('c','d','e'):
        print(a + b)


before =[10000,8000,5500,4000]
after = []
for one in before:
    after.append(one*0.9)
print(after)

before =[10000,8000,5500,4000]
after=[int(one*0.9) for one in before if one >5500]
print(after)

# #------------------------------冒泡排序------------------------
# alist = [9,5,6,1]
# for i in range(0,len(alist)-1):
#     for j in range(0,len(alist)-i-1):
#         if alist[j] > alist[j+1]:
#             alist[j],alist[j+1] = alist[j+1],alist[j]
# print(alist)

# name =  'A old lady come in, the name is Mary, level 94454'
# name1=name.split()[8].split(',')[0]
# print(name1)


# def getName(srcStr):
#     srcStr =srcStr.split(',')[1].split()[3]
#     return srcStr
# # s ='A old lady come in, the name is Mary, level 94454' #定义变量
# print(getName('A old lady come in, the name is Mary, level 94454'))

filedir = 'd:/pytese228.txt'
with open(filedir,'w') as foo:
    foo.write('123456')
    


















